<?php
	/**
	* @package includes
	* @desc This file is the settings for our Smarty Templates.
	*/
	
	// Prepare smart template
	
    //get public directory structure eg "/top/second/third"
    $public_directory = dirname($_SERVER['PHP_SELF']);
    //place each directory into array
    $directory_array = explode('/', $public_directory);
    //get highest or top level in array of directory strings
    $public_base = max($directory_array);
	//Remove ~
   $user = substr($public_base, 1);

	
	
	// Old school
	/**
	* @desc Different user directory, testing purposes.
	*/
	if ($user == "s3167460")
      define("USER_HOME_DIR", "/home/j/jjamero/");
   else
      define("USER_HOME_DIR", "/home/stud/" . $user);
	
	/**
	* @desc This is the directory to our smarty installation
	*/
	require(USER_HOME_DIR . "/php/Smarty-2.6.26/Smarty.class.php");
	$smarty = new Smarty();
	$smarty->template_dir = USER_HOME_DIR . "/.HTMLinfo/parkfind/templates";
	$smarty->compile_dir = USER_HOME_DIR . "/php/Smarty-Work-Dir/templates_c";
	$smarty->cache_dir = USER_HOME_DIR . "/php/Smarty-Work-Dir/cache";
	$smarty->config_dir = USER_HOME_DIR . "/php/Smarty-Work-Dir/configs";
?>